<!--
<template>
    <div class="test">
        <button @click="demo">测试按钮 发送请求</button>
        <h1>{{ $store.state.home.num }}</h1> 

        <button @click="demo">点击请求模拟的api</button>
    </div>
</template>

<script>

    // import {ReqGetBaseCategoryList} from "@/api/index"

    // export default {
    //     name:"Test",
    //     methods:{
    //         async demo(){
               
    //                 let data = await ReqGetBaseCategoryList();
    //                 // console.log("这是组件成功的回调");
    //                 console.log(data);
                
               
    //         }
    //     },
    //     mounted(){
    //         console.log(this.$store.state.home.num);
    //     }
    // }

    import {ReqGetSlideList,ReqGetFloorList}  from '@/api';

    export default{
        name:"Test",
        methods:{
            async demo(){
                let data = await ReqGetSlideList();
                console.log(data);

                let data1 = await ReqGetFloorList();
                console.log(data1);
            }
        }
    }

</script>

<style lang="less" scoped>
.test{
    height: 300px;
    background: gainsboro;
}
</style>   
-->

<!--


<script>
export default {
    name: "Test",
    methods: {
        add() {
            this.num++;
        }
    },
    data() {
        return {
            num: 1,
            obj: {
                a: {
                    b: {
                        c: {
                            d: 10
                        }
                    }
                }
            }
        }
    },
    // mounted(){
    //   console.log("初始化展示数据",this.num);
    // },
    // beforeUpdate(){
    //   console.log("数据变化了",this.num);
    // },
    watch: {
        // num(value){
        //   console.log("watch监听数据变化了",value);
        // },
        obj:{
            deep:true,
            handler(){
                console.log("数据obj变了");
            }
        }
    }
}
</script>

<style lang="less" scoped>
.test{
  height: 300px;
  background: gainsboro;
  text-align: center;
}
</style>

-->

<!--
<template>
    <div class="test">
        
            <el-button @click="demo"  round>默认按钮</el-button>
    </div>
</template>

<script>
export default {
    name: "test",
    methods:{
        demo(){
            // this.$message({
            //   message:"添加成功！",
            //   type:"success",
            //   showClose:true
            // });

            // this.$message.success("成功");
            // this.$message.info("成功");

            this.$confirm('此操作将永久删除该文件, 是否继续?', '提示',{
                confirmButtonText:'ok',
                cancelButtonText:'关闭',
                type:'warning'
            }).then(()=>{
                this.$message({
                    type:'success',
                    message:'删除成功!'
                });
            }).catch(()=>{
                this.$message({
                    type:'info',
                    message:'已取消删除'
                })
            })
        }
    }
};
</script>

<style lang="less" scoped>
.test {
  height: 300px;
  background: gainsboro;
  text-align: center;


  .font{
    font-size: 50px;
    color: red;
  }
}
</style>
-->

<template>
    <div class="test">
        <input v-validate="'required|email'" name="邮箱" type="text">
        <span>{{ errors.first('邮箱') }}</span>
    </div>
</template>

<script>
    export default {
        name:"Tests"
    }
</script>

<style lang="less" scoped>
.test {
  height: 300px;
  background: gainsboro;
  text-align: center;


  .font{
    font-size: 50px;
    color: red;
  }
}
</style>